package api_models

import (
	"longmen/server/pkg/db/mysql/models/models_live"
	"longmen/server/pkg/db/mysql/models/models_main"
)

type IdentityAuthReq struct {
	RealName       string `json:"real_name" validate:"required" example:"lu"`                         //真实姓名
	IdNum          string `json:"id_num" validate:"required,min=1,max=30" example:"1234567891234567"` //身份证号
	IdCardUrl      string `json:"id_card_url"`                                                        //身份证照片 正面,反面,手持
	LiveCategories int    `json:"live_categories" validate:"required" example:"6"`                    //直播类型id
	LiveCareer     int    `json:"live_career" validate:"required" example:"12"`                       //直播生涯经验(月)
	QQ             string `json:"qq" example:"545555555"`                                             //qq号码
	WeChat         string `json:"we_chat" example:"13900008888"`                                      //微信
	Desc           string `json:"desc" validate:"required,min=5" example:"大家好,我是卢本伟"`                 //自我介绍
	Mobile         string `json:"mobile" validate:"required,max=15" example:"13900008888"`            //手机号
	Referrer       string `json:"referrer" validate:"max=32" example:"李雷"`                            //推荐人
	SmsCode        string `json:"smscode" validate:"required,min=4,max=4" example:"9999"`             //验证码
}

type SendBindCodeReq struct {
	Mobile string `json:"mobile"`
}

// 发布关注主播
type PubAttentanchorMess struct {
	RoomId   int `json:"room_id"`
	UserId   int `json:"user_id"`
	Anchorid int `json:"anchorid"`
}

type AttentanchorReq struct {
	Anchorid int    `json:"anchorid" validate:"required"`
	Uid      uint32 `json:"uid"`
	ClientIp string `json:"client_ip"`
}

type AttentanchorResp struct {
	FansCount int64 `json:"fans_count"` //粉絲數
	Type      int   `json:"type"`       //1关注 0-取消
}

type AttentanchorsReq struct {
	Anchorids []int `json:"anchorids" validate:"required"` // 主播id集合
}

type AttentanchorsResp struct {
	Liveing []struct {
		models_live.Live
		Anchor *Anchor `json:"anchor"`
	} `json:"living"`
	Resting []*Anchor `json:"resting"`
}

type GetAnchorInfoReq struct {
	Anchorid int `json:"anchorid" validate:"required"`
	Uid      int `json:"uid"`
}

type CheckAnchorExistReq struct {
	Anchorid int `json:"anchorid" validate:"required"`
}

type GetAnchorInfoResp struct {
	models_main.User
	Profile     *models_main.UserProfile `json:"profile"`
	Live        *models_live.Live        `json:"live"`
	Isattent    int                      `json:"isattent"`
	OutTags     []*models_main.ConfigTag `json:"tags"`
	AttentCount int                      `json:"attent_count"`
	FansCount   int                      `json:"fans_count"`
	GiftSpend   int                      `json:"gift_spend"`
	MomentCount int                      `json:"moment_count"`
}

type AddVisitorLogReq struct {
	Anchorid int `json:"anchorid" validate:"required"`
}

type GetAttentAnchorsReq struct {
	PageParam
}

type GetAttentAnchorsResp struct {
	List []struct {
		models_main.AnchorFans
		Anchor struct {
			Anchor
			Live     *models_live.Live `json:"live"`
			Isattent int               `json:"isattent"`
		} `json:"anchor"`
	} `json:"list"`
	TotalCount int64 `json:"total_count"`
}

type CheckAttentReq struct {
	Anchorid int `json:"anchorid" validate:"required"`
}

type GetAnchorBasicInfoReq struct {
	Anchorid int `json:"anchorid" validate:"required"`
}

type GetAnchorBasicInfoResp struct {
	Anchor
	FansCount  int `json:"fans_count"`
	Popularity int `json:"popularity"`
}

type CaCheAnchorBaseInfo struct {
	Name       string
	AnchorType int
}

// 敏感词
type GetBlackKeywordResp struct {
	Keywords []string `json:"keywords"`
}

type AnchorCheckResp struct {
	Status     uint32 `json:"status"`      //0否 1是
	AnchorType uint32 `json:"anchor_type"` //主播类型 1:普通主播, 2:公司主播, 3:测试主播,4.官方直播间
}
